package brvh;

import com.chad.library.adapter.base.BaseSectionQuickAdapter;
import com.chad.library.adapter.base.BaseViewHolder;
import com.sumansoul.multiplerecycleview.R;

import java.util.List;

public class ExamCourseAdapter extends BaseSectionQuickAdapter<ExamCourseSection, BaseViewHolder> {

    /**
     * Same as QuickAdapter#QuickAdapter(Context,int) but with
     * some initialization data.
     *
     * @param layoutResId      The layout resource id of each item.
     * @param sectionHeadResId The section head layout id for each item
     * @param data             A new list is created out of this one to avoid mutable list
     */
    public ExamCourseAdapter(int layoutResId, int sectionHeadResId, List<ExamCourseSection> data) {
        super(layoutResId, sectionHeadResId, data);
    }

    @Override
    protected void convertHead(BaseViewHolder helper, ExamCourseSection item) {
        helper.setText(R.id.text_header, item.header);
    }

    @Override
    protected void convert(BaseViewHolder helper, ExamCourseSection item) {
        ExamInfoBean.ExamDataBean.InfoListBean listBean = item.t;
        helper.setText(R.id.text_content, listBean.getTitle());
    }
}